# coding:utf-8
# 曾山
# 时间 2022/5/1 1:35


#用户模块下的蓝图 包括用户模块的所有资源

from flask import Blueprint
from flask_restful import Api,reqparse
from comment.utils.output import output_json
user_bp = Blueprint('users',__name__,url_prefix='/user')


user_api = Api(user_bp)
# #在当前用户模块中添加请求钩子
# user_bp.before_request()
user_api.representation('application/json')(output_json)

from Shopping.resources.user.user_resource import Shopping_user,IsExistPhoneResource,UserLoginOutResource,User_SMS,AuthorizationCodeResource,RegisterUserResource,UserLoginResource
user_api.add_resource(Shopping_user,'/hello',endpoint = 'user')
user_api.add_resource(User_SMS,'/sms',endpoint = 'sms')
user_api.add_resource(AuthorizationCodeResource,'/authorization',endpoint = 'authorization')
user_api.add_resource(RegisterUserResource,'/register',endpoint = 'register')
user_api.add_resource(UserLoginResource,'/login',endpoint = 'login')
user_api.add_resource(IsExistPhoneResource,'/isExist',endpoint = 'isExist')
user_api.add_resource(UserLoginOutResource,'/logOut',endpoint = 'logOut')